package light.head.model.el;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Formula;
/**
 * 前置课程
 */
@Table
@Entity
public class FrontCourse implements Serializable {
	
	private static final long serialVersionUID = 7559722487961004510L;
	private Integer code;
	private Integer cc;
	private Integer fc;
	
	private String fn;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column
	public Integer getCode() {
		return code;
	}
	@Column
	public Integer getCc() {
		return cc;
	}
	@Column
	public Integer getFc() {
		return fc;
	}
	@Formula("(SELECT c.name FROM Course c WHERE c.code = fc)")
	public String getFn() {
		return fn;
	}
	
	

	
	public void setFc(Integer fc) {
		this.fc = fc;
	}
	public void setCode(Integer code) {
		this.code = code;
	}

	public void setCc(Integer cc) {
		this.cc = cc;
	}

	public void setFn(String fn) {
		this.fn = fn;
	}
	
	

}
